<!--挂号订单管理 -->


<template>

  <div>
    <el-button type="primary"
               style="float:right"
               @click="re()">返回</el-button>
    <div>
      <el-descriptions title="挂号信息">
        <el-descriptions-item label="就诊时间">{{guahaomessage.time}}</el-descriptions-item>
        <el-descriptions-item label="就诊医院">{{guahaomessage.hospital}}</el-descriptions-item>
        <el-descriptions-item label="科室">{{guahaomessage.department}}</el-descriptions-item>
        <el-descriptions-item label="医生">{{guahaomessage.doctor}}</el-descriptions-item>
        <el-descriptions-item label="医生职称">{{guahaomessage.doctortitle}}</el-descriptions-item>
        <el-descriptions-item label="医事服务费">{{guahaomessage.charge}}</el-descriptions-item>
        <el-descriptions-item label="挂号单号">{{guahaomessage.id}}</el-descriptions-item>
      </el-descriptions>
    </div>
    <br>
    <br>
    <div>
      <el-descriptions title="订单信息">
        <el-descriptions-item label="订单编号">{{ordermessage.orderid}}</el-descriptions-item>
        <el-descriptions-item label="状态">{{ordermessage.state}}</el-descriptions-item>
        <el-descriptions-item label="应付金额">{{ordermessage.pay}}</el-descriptions-item>
        <el-descriptions-item label="优惠券">{{ordermessage.coupon}}</el-descriptions-item>
        <el-descriptions-item label="实际支付">{{ordermessage.actualpay}}</el-descriptions-item>
        <el-descriptions-item label="创建时间">{{ordermessage.createtime}}</el-descriptions-item>
        <el-descriptions-item label="支付方式">{{ordermessage.method}}</el-descriptions-item>
        <el-descriptions-item label="支付时间">{{ordermessage.paytime}}</el-descriptions-item>
      </el-descriptions>
    </div>
    <br>
    <br>
    <div>
      <el-descriptions title="就诊人信息">
        <el-descriptions-item label="姓名">{{patientmessage[0].name}}</el-descriptions-item>
        <el-descriptions-item label="性别">{{patientmessage[0].gender}}</el-descriptions-item>
        <el-descriptions-item label="年龄">{{patientmessage[0].age}}</el-descriptions-item>
        <el-descriptions-item label="联系电话">{{patientmessage[0].telephone}}</el-descriptions-item>
      </el-descriptions>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      guahaomessage: '',
      ordermessage: '',
      patientmessage: '',
      id: this.$route.query.id,
    }
  },
  methods: {
    re: function () {
      this.$router.push({
        name: 'GuahaoOrder',
      })
    },
    created() {
      this.$axios
        .get('http://localhost:9527/guahao/guahaomesaage?id=' + this.id)
        .then((res) => {
          console.log(res)
          this.guahaomessage = res.data.data
        })
      this.$axios
        .get('http://localhost:9527/guahao/ordermesaage?id=' + this.id)
        .then((res) => {
          console.log(res)
          this.ordermessage = res.data.data
        })
      this.$axios
        .get('http://localhost:9527/guahao/patientmessage?id=1')
        .then((res) => {
          console.log(res)
          this.patientmessage=res.data.data
          console.log(this.patientmessage);
        })
    },
  },
  created() {
    this.created()
  },
}
</script>

<style scoped>
</style>